package objects;


public class Card {

	private CardType type;
	private String name;
	
	public Card()
	{}
	
	public Card(String name, CardType type)
	{
		this.type = type;
		this.name = name;
	}
	
	public CardType getType() {
		return type;
	}
	public void setType(CardType type) {
		this.type = type;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	public boolean equals(Card crdCompare) 
	{
	   boolean bAreEqual = false;
	   if(this.getName() == crdCompare.getName() && this.getType() == crdCompare.getType())
	   {
		   bAreEqual = true;
	   }
	   return bAreEqual;
	}
	
	@Override
	public String toString() {
	   return "DataObject [card=[" + type.name() + "," + name + "]";
	}
	
}
